#!/bin/sh

INP=$(TA_DECL).ml

echo "open $(TA_DECL)" 
echo "" 
echo "class virtual basic = object" 
cat $INP |grep :| sed "s/;//g" \
    | awk -F: '{print("  val virtual mutable ",$1,": ",$2)}' 
echo "end" 
echo "" 

echo "class of_record r = object" 
cat $INP |grep :| sed "s/;//g" \
    | awk -F: '{print("  val mutable ",$1," = r.",$1,"\n  method ",$1," = ",$1)}' 

echo "end" 

